<!--/**
* Author: ganqz
* Date: 2022-08-05 17:30
* Desc: PreFilm
*/
-->
<template>
  <view v-show="i === index">
    <zm-mescroll-body
      ref="mescrollRef"
      @init="mescrollInit"
      @down="downCallback"
      @up="upCallback"
      :up="upOpt"
    >
      <ticket-item
        :want-view="item.wantView"
        @look="toLook"
        @buy="toBuy"
        :item="item"
        :type="current"
        v-for="item in listData"
        :key="item.filmId"
      />
    </zm-mescroll-body>
  </view>
</template>
<script>
  import listMixins from '@/mixins/newListMixin'
  import MescrollItemMixin from '@/commons/ZmMescrollUni/mixins/mescroll-more-item'
  import ZmMescrollBody from '@/commons/ZmMescrollBody/index.vue'
  import TicketItem from './TicketItem'
  export default {
    name: 'pre-film',
    components: { ZmMescrollBody, TicketItem },
    mixins: [listMixins, MescrollItemMixin],
    props: {
      query: {}
    },
    data() {
      return {
        pkId: 'filmId',
        upOpt: {
          empty: {
            use: true, // 是否显示空布局
            icon: 'https://www.mescroll.com/img/mescroll-empty.png', // 图标路径
            tip: '~ 暂无相关数据 ~', // 提示
            btnText: '去逛逛 >', // 按钮
            fixed: false, // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
            top: '100rpx', // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
            zIndex: 99 // fixed定位z-index值
          }
        }
      }
    },
    onLoad(option) {
      console.log(option)
      //   this.init()
    },
    onShow() {
      //   this.init()
    },
    computed: {},
    methods: {
      init() {},
      listLoad(param) {
        return uni.$api.film.getPreFilmList({ ...this.query, ...param })
      }
    }
  }
</script>
